//
//  GXOrderNewsViewCell.m
//  YIChuSeller
//
//  Created by 田小椿 on 2018/11/27.
//  Copyright © 2018年 xiangshengjun. All rights reserved.
//

#import "GXOrderNewsViewCell.h"
@interface GXOrderNewsViewCell()
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UILabel *contentLabel;
@property (weak, nonatomic) IBOutlet UILabel *contentDetailLabel;
@property (weak, nonatomic) IBOutlet UIImageView *nextImageView;


@end
@implementation GXOrderNewsViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectButton = self.imageButton;
    self.imageButton.hidden = YES;
    self.titleLabelLeft.constant = 10;
}
-(void)setModel:(GXOrderNewsModel *)model
{
    _model = model;
    self.titleLabel.text = model.title;
    self.timeLabel.text = model.time;
    self.contentLabel.text = model.content;
    self.imageButton.selected = model.buttonSate;
    self.imageButton.hidden = !model.isEdit;
    if (model.isEdit) {
        self.titleLabelLeft.constant = 30;
    }else {
        self.titleLabelLeft.constant = 10;
    }
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}
- (IBAction)pressImageBtn:(UIButton *)sender {
    sender.selected = !sender.selected;
    self.imageButton.selected = sender.selected;
    WeakSelf(weakSelf);
    if (weakSelf.selectButtonBlock) {
        weakSelf.selectButtonBlock(sender);
    }
}
- (IBAction)pressContentDetailBtn:(id)sender {
    
}

 
@end
